package com.example.scala.chapter3

/**
 *
 * Description:
 *
 * Create by lucienoz on 2021/10/15.
 * Copyright © 2021 lucienoz. All rights reserved.
 */
object chapter07 {
	def main(args : Array[String]) : Unit = {

		var flag : Boolean = true
		var i : Int = 5
		//while

		while(flag){
			println(i)
			i-=1
			if (i==0){
				flag = false
			}
		}

		//do while

		flag = true
		i = 5

		do{
			println(i)
			i-=1
			if (i==0){
				flag = false
			}
		}while(flag)

	}

}
